<fieldset>
    <legend>{:lang('条件搜索')}</legend>
    <form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">

         <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('单号')}</label>
            <label class="layui-input-inline">
                <input name="order_no" value="{$get.order_no|default=''}" placeholder="{:lang('请输入箱码')}" class="layui-input">
            </label>
        </div>
        
         <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('箱码')}</label>
            <label class="layui-input-inline">
                <input name="boxcode" value="{$get.boxcode|default=''}" placeholder="{:lang('请输入箱码')}" class="layui-input">
            </label>
        </div>
         <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('罐码')}</label>
            <label class="layui-input-inline">
                <input name="sncode" value="{$get.sncode|default=''}" placeholder="{:lang('请输入罐码')}" class="layui-input">
            </label>
        </div>
        
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('网点编号')}</label>
            <label class="layui-input-inline">
                <input name="wdbh" value="{$get.wdbh|default=''}" placeholder="{:lang('请输入网点编号')}" class="layui-input">
            </label>
        </div>
        
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('网点名称')}</label>
            <label class="layui-input-inline">
                <input name="wd_name" value="{$get.wd_name|default=''}" placeholder="{:lang('请输入网点名称')}" class="layui-input">
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('签收时间')}</label>
            <div class="layui-input-inline">
                <input data-date-range name="qs_time" value="{$get.qs_time|default=''}" placeholder="{:lang('请选择签收时间')}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('发货上级编号')}</label>
            <label class="layui-input-inline">
                <input name="custcode" value="{$get.custcode|default=''}" placeholder="{:lang('请输入发货上级编号')}" class="layui-input">
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('退货状态')}</label>
            <label class="layui-input-inline">
                <select name="is_return"  class="layui-select">
                    <option value="">全部</option>
                    <option value="1">已退货</option>
                    <option value="0">未退货</option>
                </select>
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">{:lang('签收状态')}</label>
            <label class="layui-input-inline">
                <select name="is_qianshou"  class="layui-select">
                    <option value="">全部</option>
                    <option value="1">已签收</option>
                    <option value="0">待签收</option>
                </select>
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <button type="submit" class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> {:lang('搜 索')}</button>
            <button type="button" data-form-export="{:url('index')}?type={$type|default=''}" class="layui-btn layui-btn-primary">
                <i class="layui-icon layui-icon-export"></i> {:lang('导 出')}
            </button>
        </div>
    </form>
</fieldset>

<script>
   
    require(['excel'], function (excel) {
        excel.bind(function (data) {
             // 设置表格内容
            data.forEach(function (item, index) {
                data[index] = [
                    item.id, 
                    item.order_no, 
                    item.wdbh, 
                    item.wd_name, 
                    item.count, 
                    item.custname,
                    item.custcode, 
                    item.boxcode,
                    item.sncode,
                    item.product_size,
                    item.batch,
                    item.product_code,
                    item.product_name,
                    item.is_send,
                    item.is_qianshou,
                    item.qs_time,
                    item.add_time,
                    item.is_return
                ];
            });

            // 设置表头内容
            data.unshift(['ID', 
                 '{:lang("发货单号")}', 
                 '{:lang("接收编码")}', 
                 '{:lang("接收名称")}', 
                 '{:lang("接收数量")}', 
                 '{:lang("发货上级名称")}', 
                 '{:lang("发货上级编码")}',
                 '{:lang("箱码")}',
                 '{:lang("罐码")}',
                  '{:lang("规格")}',
                  '{:lang("批次")}',
                  '{:lang("产品编号")}',
                  '{:lang("产品名称")}', 
                  '{:lang("是否在库")}',
                  '{:lang("是否签收")}',
                  '{:lang("签收日期")}', 
                  '{:lang("发货日期")}',
                  '{:lang("是否退货")}'
            ]);
            
            // 应用表格样式
            return this.withStyle(data, {A: 60, B: 80, C: 99, E: 120, G: 120});

        }, '{:lang("发货明细")}' + layui.util.toDateString(Date.now(), '_yyyyMMdd_HHmmss'));
    });
</script>